<%@ taglib prefix="tiles" uri="http://tiles.apache.org/tags-tiles" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<tiles:insertDefinition name="defaultTemplate">
    <tiles:putAttribute name="content">
        <h2 class="page-header">
            Regisration
        </h2>

        <div class="page-description">
            <p class="paragraph">
                Registration on this site will give you some advantages, like uploading your books and accessing them
                from any device connected to the internet.</p>

            <p class="paragraph">
                To register, just fill a few fields blow.</p>
        </div>
        <form:form cssClass="registration-form" action="/registration/addUser" modelAttribute="newUser">
            <label class="registration-field" path="username">
                <span class="registration-label">Username</span>
                <form:input path="username" cssClass="registration-input"></form:input>
                <form:errors path="username" cssClass="error"></form:errors>
            </label>
            <label class="registration-field">
                <span class="registration-label">First Name</span>
                <form:input path="firstName" cssClass="registration-input"></form:input>
                <form:errors path="firstName" cssClass="error"></form:errors>
            </label>
            <label class="registration-field">
                <span class="registration-label">Last Name</span>
                <form:input path="lastName" cssClass="registration-input"></form:input>
                <form:errors path="lastName" cssClass="error"></form:errors>
            </label>
            <label class="registration-field">
                <span class="registration-label">Password</span>
                <form:input path="password" type="password" cssClass="registration-input"></form:input>
                <form:errors path="password" cssClass="error"></form:errors>
            </label>
            <label class="registration-field">
                <span class="registration-label">E-mail</span>
                <form:input path="email" cssClass="registration-input"></form:input>
                <form:errors path="email" cssClass="error"></form:errors>
            </label>
            <button class="registration-submit" type="submit">
                Register
            </button>
        </form:form>
        <%--<form class="registration-form" action="/registration/addUser" method="post">--%>
        <%--<label class="registration-field">--%>
        <%--<span class="registration-label">Username</span>--%>
        <%--<input class="registration-input" name="username" placeholder="Superman183">--%>
        <%--</label>--%>
        <%--<label class="registration-field">--%>
        <%--<span class="registration-label">First Name</span>--%>
        <%--<input class="registration-input" name="fname" placeholder="Superman183">--%>
        <%--</label>--%>
        <%--<label class="registration-field">--%>
        <%--<span class="registration-label">Last Name</span>--%>
        <%--<input class="registration-input" name="lname" placeholder="Superman183">--%>
        <%--</label>--%>
        <%--<label class="registration-field">--%>
        <%--<span class="registration-label">Password</span>--%>
        <%--<input class="registration-input" name="password" type="password" placeholder="************">--%>
        <%--</label>--%>
        <%--<label class="registration-field">--%>
        <%--<span class="registration-label">E-mail</span>--%>
        <%--<input class="registration-input" name="email" placeholder="superman83@mail.com">--%>
        <%--</label>--%>
        <%--<button class="registration-submit" type="submit">--%>
        <%--Register--%>
        <%--</button>--%>
        <%--</form>--%>
    </tiles:putAttribute>
    <tiles:putAttribute name="popup">
        <br>
    </tiles:putAttribute>
</tiles:insertDefinition>